﻿<UserControl x:Class="Application4.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="768" d:DesignWidth="1366">

    <Grid x:Name="LayoutRoot" Background="#FF0C3CCC">
        <Grid.RowDefinitions>
            <RowDefinition Height="0"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid x:Name="Setting">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="Username" Grid.Row="0" Grid.Column="0"/>
            <TextBlock Text="Password" Grid.Row="1" Grid.Column="0"/>
            <TextBox x:Name="UsernameForm" Grid.Row="0" Grid.Column="1" Text="{Binding Path=Username}"/>
            <PasswordBox x:Name="PasswordForm" Grid.Row="1" Grid.Column="1" Password="{Binding Path=Password}"/>
            <Button Content="Save" x:Name="Save" Click="SaveSettings" Grid.Row="2"/>
        </Grid>
        <ScrollViewer VerticalScrollBarVisibility="Auto" Padding="60,40,20,20" Grid.Row="1">
            <StackPanel>
                <ListView x:Name="ItemListView">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBlock Text="{Binding Path=Subject}"/>
                                <TextBlock Text="{Binding Path=MsgID}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>